<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .test .parent{
            width:500px;
            height: 500px;
            background-color: red;
        }
        .test .child{
            height: 200px;
            background-color: blue;
        }
    </style>
</head>
<body>
    <div class="test">
        <div class="parent">
            <div class="child">
                child1
            </div>
            <div class="child">
                child2
            </div>
        </div>
    </div>
</body>
</html>